package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseData;
import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wxfootprint.WxFootprintVo;
import com.cskaoyan.service.WxFootprintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * \* Description:
 * \
 */
@RestController
@RequestMapping("wx/footprint")
public class WxFootprintController {

    @Autowired
    WxFootprintService wxFootprintService;

    @GetMapping("list")
    public BaseRespVo list(Integer limit, Integer page) {

        BaseData<WxFootprintVo> data = wxFootprintService.list(limit,page);

        return BaseRespVo.ok(data);

    }

    @PostMapping("delete")
    public BaseRespVo delete (@RequestBody Map map){
        Integer id = (Integer) map.get("id");
        wxFootprintService.delete(id);
        return BaseRespVo.ok();
    }


}
